#include <iostream>
#include <iomanip>
#include <time.h>
#define LL long long

using namespace std;


int main()
{
	LL allsecond;
	cout << "当前时间戳为:"
		 << time(0) << endl
		 << "输入一个时间戳:";
	cin >> allsecond;
	allsecond=allsecond%(24*3600);
	int hour,mint;
	for(hour=0;allsecond>=3600;hour++){
		allsecond-=3600;
	}
	for(mint=0;allsecond>=60;mint++){
		allsecond-=60;
	}
	cout << "北京时间为:";
	cout << setfill('0') << setw(2) <<hour+8<<":";
	cout << setfill('0') << setw(2) <<mint<<":";
	cout << setfill('0') << setw(2) <<allsecond;
	return 0;
}
